import request from '@/utils/request'
// 点位列表
const getDw = (data) => request.get('/api/vm-service/node/search', {
  params: {
    ...data
  }
})
// 删除
const delFnDw = (id) => request.delete(`/api/vm-service/node/${id}`)
// 新增
const addDw = (data) => request.post('/api/vm-service/node', data)
// 商圈列表
const getShangquan = () => request.get('/api/vm-service/businessType')
// 合作商
const getHezuoshang = (data) => request.get('/api/user-service/partner/search', {
  params: {
    ...data
  }
})
// 点位详情
const getDwXq = (id) => request.get(`/api/vm-service/node/vmList/${id}`)
// 修改点位
const xgDw = (data) => request.put(`/api/vm-service/node/${data.id}`, data)
export {
  getDw,
  delFnDw,
  getShangquan,
  getHezuoshang,
  addDw,
  getDwXq,
  xgDw
}
